package com.nx.samuel.dubbo_vip_loadbalance_demo.consumer;

import com.nx.samuel.dubbo_vip_loadbalance_demo.api.HelloService;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class LbConsumer {

    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-consumer.xml");
        context.start();

        HelloService helloService = context.getBean("helloService", HelloService.class);

        for (int i=0 ;i <10; i++) {
//            Thread.sleep(1000);
            String result = helloService.sayHello("nxnxnx");
            System.out.println(result);
        }


    }
}
